Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PL-47: Domain submodule #4

Open
wants to merge 4 commits into
base: 8.x-1.x
Choose a base branch
from

Conversation

damontgomery
Copy link

@damontgomery damontgomery commented Jan 4, 2019

This adds a submodule which allows the mapping of domains used by the Domain module to new fields. Using this, we can configure a value per field so that content contained on one site is listed as that site.

Testing steps

  • Install the search_api_field_map_domain module
  • Add a new field to the search fields
    • Example: /admin/config/search/search-api/index/federated_search_index/fields
    • Use type General > Mapped Domain Site Name Field

example

field_config

Index the content

  • Edit a node
  • Save and publish the node
  • Search on your index
  • Display the mapped value

Example:

example

domain-two

Test with devel

  • Go to a solr devel page such as /devel/node/1/solr
  • View the row generated
  • Find your mapped values

@damontgomery
Copy link
Author

I need to look at domain a bit more. I'm currently checking the current domain, but I don't know if that will be valid when content is sent to the search server (such as solr).

@damontgomery
Copy link
Author

I'll re-open this after more checks.

Multiple fields can be created, so using `site name` as part of the plugin doesn't make sense.
@damontgomery
Copy link
Author

I was able to confirm that during initial index (by drush), the first domain is used. Then, whatever you are logged in to will be used as the domain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant